package d1_inner_class1;

public class Outer {
    private int age;
    private static String schoolName;

    /***
     * 内部类inner 相当于静态方法
     */
    public static class Inner{
        private String name;
        private int age;

        public void test(){
            //内部类可以访问外部类的静态成员
//            不能访问外部类的实例成员
            System.out.println(schoolName);
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public int getAge() {
            return age;
        }

        public void setAge(int age) {
            this.age = age;
        }
    }
}
